import 'package:flutter/material.dart';
import 'package:get/get.dart';

void main() {
  runApp(GetMaterialApp(
    home: Scaffold(
      // appBar: AppBar(
      //   title: const Text("你好111"),
      // ),
        body: MyApp()),
  ));
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return MaterialApp(
      title: 'beline app',
      home: HomePage(),
    );
  }
}

class HomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Scaffold(
      appBar: AppBar(title: Text("首页")),
      body:  Container(
        child: ListView(children: [
          ElevatedButton(onPressed: () {
            Get.to(searchPage());
          }, child:const Text("进入搜索页"),)
          // BottomNavigationBarItem(
          //   child:Text("进入搜索页"), 
          //     icon: Icon(Icons.home),
          //   onPressed:() {
          //     Navigator.of(context).push(
          //       MaterialPageRoute(
          //         builder: (BuildContext context) {
          //           return searchPage();
          //         }
          //       )
          //     )
          //   }
          // )
        ],),
      ),
    );
  }
}

class searchPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Scaffold(
      appBar:  AppBar(title: Text("搜索页面"),),
      body: Container(
        child: Text("搜索页面主体内容"),
      ),
    );
  }
  
}

